project(Chapter1)

message("CERES_INCLUDE_DIR =  ${CERES_INCLUDE_DIR}")
message("CERES_LIBRARIES =  ${CERES_LIBRARIES}")

# 基础旋转矩阵
ADD_EXECUTABLE(Cr_Rotation Cr_Rotation.cpp)
TARGET_LINK_LIBRARIES(Cr_Rotation ${CERES_LIBRARIES})

ADD_EXECUTABLE(Cr_Helloworld Cr_Helloworld.cpp)
TARGET_LINK_LIBRARIES(Cr_Helloworld ${CERES_LIBRARIES})

ADD_EXECUTABLE(Cr_Powell Cr_Powell.cpp)
TARGET_LINK_LIBRARIES(Cr_Powell ${CERES_LIBRARIES})

add_definitions(-DME_NO_VTK)
ADD_EXECUTABLE(Cr_MultiParams Cr_MultiParams.cpp
    ${ME_MEMATH_SRCS} ${ME_MEMATH_HDRS} ${ME_EIGENMATH}
    )
TARGET_LINK_LIBRARIES(Cr_MultiParams ${CERES_LIBRARIES} ${OpenCV_LIBS})
qt5_use_modules(Cr_MultiParams ${MEQT_LIB})

# 计算两个坐标系的转换矩阵M
ADD_EXECUTABLE(Cr_RigidTransform Cr_RigidTransform.cpp
    ${ME_MEMATH_SRCS} ${ME_MEMATH_HDRS} ${ME_EIGENMATH}
    )
TARGET_LINK_LIBRARIES(Cr_RigidTransform ${CERES_LIBRARIES} ${OpenCV_LIBS})
qt5_use_modules(Cr_RigidTransform ${MEQT_LIB})

